import Base from './bash'
class BrowerHistory extends Base {
  constructor(router) {
    super(router);
  }
  setupListener() {
    window.addEventListener("popstate", () => {
      this.transitionTo(location.pathname)
    })
  }
  getCurrentLocation() {
    return location.pathname
  }
  push(location) {
    this.transitionTo(location, () => {
      history.pushState({}, "", location)
    })
  }
}
export default BrowerHistory;